#! /usr/bin/env node
const inquirer=require("inquirer")
const fs=require("fs");
const path=require("path");
const addfile=(filename)=>{
        const filepath=path.join(process.cwd(),filename);
 
        fs.writeFileSync(filepath,'');
}
inquirer.prompt([
    {
        type:"list",
        name:"请输入文件类型",
        choices:['增加','删除'],
    },
    {
        type:"input",
        name:"请输入文件",
    }
]).then(res=>{
     const filename=res['请输入文件']
     const filetype=res["请输入文件类型"]
    console.log(filename)
      switch(filetype){
           case "增加":
               addfile(filename)
                break ;
      }
    })